//api文件夹用于存放对后台请求的代码
import service from ".";//导入

const departmentApi = {
    //增加
    insert(college) {
        //发送axios请求给服务器
        return service.post('/admin/college', college);
    },
    //根据id删除
    delete(zid) {//删除和根据id查要用反引号
        return service.delete(`/admin/college/${zid}`);
    },
    //修改
    update(college) {
        return service.put('/admin/college', college);
    },
    //查询所有
    selectAll() {
        return service.get('/admin/college');
    },
    //根据id查询
    selectByZid(zid) {
        return service.get(`/admin/college/${zid}`);
    }
};

export default departmentApi;//导出